libvchan: tidy up usages of fcntl in select-type sample application
authorMatthew Daley <mattjd@gmail.com>
Fri, 1 Nov 2013 00:33:23 +0000 (13:33 +1300)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 4 Nov 2013 17:13:38 +0000 (17:13 +0000)
commit098ef0c4d4e0b867e86ddbb9ebc813bb8c2ad617
tree65bff254041d5ad5cd63e14158a6309a430bc38f
parent940b40eb412e00b666a142d5758fa9a3da3f4168
libvchan: tidy up usages of fcntl in select-type sample application

Namely, don't overwrite all the other flags when twiddling O_NONBLOCK,
and add basic error handling.

Coverity-ID: 1055041
Signed-off-by: Matthew Daley <mattjd@gmail.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
tools/libvchan/node-select.c